﻿using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommunicationLibrary
{
    public class CommunicationFactory
    {
        public static CommunicationHandler GetConnectionObject(String portName){
            return new CommunicationHandler(portName);
        }

        public static CommunicationHandler GetConnectionObject(String portName, int bautRate)
        {
            return new CommunicationHandler(portName, bautRate);
        }

        public static String[] GetPortNames() 
        {
            return SerialPort.GetPortNames();
        }
    }
}
